home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
comt010d.zip
/
COMTSRC.ZIP
/
ENC12.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-11-16
|
927b
|
61 lines
.model tiny,C
maxline = 32
umaxline = 63/4
.data?
in_line db ?
sendz db ?
.code
nencode_block proc
public nencode_block
arg to:word, from:word, len:word
mov cx,len
or cx,cx
jz ClearLine
push si
push di
cld
mov ax,ds
mov es,ax
mov di,to
mov si,from
mov dl,in_line
Top:
lodsb
mov ah,al
and ax,0f00fh
shr ah,1
shr ah,1
shr ah,1
shr ah,1
add ax,'AA'
stosw
inc dl
cmp dl,maxline
ja putCRLF
loop Top
Return:
mov in_line,dl
sub di,to
mov ax,di
pop di
pop si
ret
putCRLF:
xor dx,dx
mov ax,0a0dh
stosw
loop Top
jmp Return
ClearLine:
mov in_line,0
xor ax,ax
ret
nencode_block endp
end